home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / decdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  277 b   |  13 lines

  1. program DecDemo;
  2. var
  3.   x: Integer;
  4.   y: array [1 .. 5] of Integer;
  5.   p: ^Integer;
  6. begin
  7.   x := 9;
  8.   Dec (x, 10);     { yields -1 }
  9.   {$X+}            { Turn on extended systax }
  10.   p := @y [5];     { p points to y [5] }
  11.   Dec (p, 3)       { p points to y [2] }
  12. end.
  13.